<html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <title>LZXリファレンス basescrollbar</title>
  <othercredit role="translator">
    <firstname>Atuo</firstname>
    <surname>Seki</surname>
        <contrib>2006/04/27　翻訳初版</contrib>
 </othercredit>
</head>
<body>

<!-- ===================================================================== -->
<!-- = XML information goes here                                         = -->
<!-- ===================================================================== -->
<lzelement title="Basescrollbar">
    <lztier>Base Component</lztier>
    <lzcategory>View</lzcategory>
    <lzshortdesc>
            スクロールバーの非視覚的機能部分
    </lzshortdesc>
    <lztag>base/basescrollbar.xml</lztag>
</lzelement>

<p>もしあなたがスクロールバーをカスタマイズしたければ、
<classname>basescrollbar</classname>のアシストクラスである
<classname>basescrolltrack</classname>、
<classname>basescrollthumb</classname>、そして
<classname>basescrollarrow</classname>を使い外観をカスタマイズできます。
これらのクラスは、リソース、色、位置や機能などの様々な要素を変更できます。
</p>


<example title="An unconventional scrollbar">
&lt;canvas height="120" bgcolor="silver" maxtextheight="700"&gt;
  &lt;class name="myscrollbar" extends="basescrollbar" width="20"&gt;
    &lt;view name="scrolltrack" width="100%" options="releasetolayout"&gt;
      &lt;basescrolltrack x="5" direction="-1"
          width="${parent.width-10}" height="${parent.thumb.y}"
          bgcolor="yellow"/&gt;
      &lt;basescrollthumb name="thumb" x="1" width="${parent.width-2}"
          bgcolor="green" /&gt;
      &lt;basescrolltrack x="5" direction="1"
          y="${parent.thumb.y+parent.thumb.height}"
          width="${parent.width-10}"
          height="${parent.height - parent.thumb.y - parent.thumb.height}"
          bgcolor="yellow"/&gt;
    &lt;/view&gt;

    &lt;basescrollarrow direction="-1"
        x="2" bgcolor="yellow" &gt;
        &lt;text&gt;up&lt;/text&gt;
        &lt;/basescrollarrow&gt;

    &lt;basescrollarrow direction="1"
        x="2" bgcolor="yellow" &gt;
      &lt;text&gt;dn&lt;/text&gt;
      &lt;/basescrollarrow&gt;
    &lt;resizelayout spacing="4"/&gt;
  &lt;/class&gt;

  &lt;view x="10" y="10" bgcolor="white"
        width="200" height="100" clip="true"&gt;
    &lt;text multiline="true" width="180"&gt;
      Man through his scientific genius has been able to draw distance and
      save time and space. He has been able to carry highways through the
      stratosphere. We read just the other day that a rocket plane went 1900
      miles in one hour. Twice as fast as the speed of sound. This is the
      new age. Bob Hope has described this new age, this jet age; it is an
      age in which planes will be moving so fast that we will have a
      non-stop flight from New York to Los Angeles, when you start out you
      might develop the hiccups and you will hic in New York and cup in Los
      Angeles. This is an age in which it will be possible to leave Tokyo on
      a Sunday morning and arrive in Seattle, Washington on the preceding
      Saturday night. When your friends meet you at the airport and ask what
      time did you leave Tokyo, you will have to say I left tomorrow. That
      is this new age.  We live in one world geographically. We face the
      great problem of making it one spiritually.
      &lt;br/&gt;
      Through our scientific means we have made of the world a
      neighborhood and now the challenge confronts us through our
      moral and spiritual means to make of it a brotherhood. We must
      live together, we are not independent we are interdependent. We
      are all involved in a single process. Whatever affects one
      directly affects all indirectly for we are tied together in a
      single progress. We are all linked in the great chain of
      humanity.
      &lt;br/&gt;
      Martin Luther King, Jr.
      &lt;br/&gt;
      11 August 1956
    &lt;/text&gt;
    &lt;myscrollbar/&gt;
  &lt;/view&gt;
&lt;/canvas&gt;
</example>

<p>スクロールバーアローは任意または、スクロールバー中におかれるでしょう。
そして、トラックとノブの要素は<varname>scrolltrack</varname>
という名前のviewの中に置かれるはずです。また、scrolltrackが二つ置かれる事は
変に見えるかもしれません。しかし、これによりユーザーがスクロールアップ、
またはダウンする際にバーを直接クリックした場合のアップ、ダウンを行う事ができます。</p>

<p><classname>basescrollbar</classname>クラスを使用する別の例は
lps/components/lz/scrollbar.lzxのlz <classname>scrollbar</classname>
のコードをご覧ください。また、自分なりのスクロールバーを作る簡単な方法は、
目的の機能デザインが同じ物をコピーし、リソースを置き換え、属性かviewを変更する事です。
</p>

</body>
</html>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2001-2004 Laszlo Systems, Inc.  All Rights Reserved.              *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->
